﻿using System.Runtime.Serialization;
using System.Windows.Media.Media3D;

namespace GameBoard
{
    [DataContract]
    public class InfoTextVisualFactory : BaseVisualFactory, IChangeLocations
    {
        public InfoTextVisualFactory(InfoTextVisualData d)
            : base(d)
        {
        }

        public override ModelVisual3D MakeVisual()
        {
            var infoVis = new InfoTextVisual();
            infoVis.PopulateVisualData(VisualData);
            return infoVis.VisualElement;
        }


        public void SetLocation(Point3D newLocation)
        {
            var infoD = VisualData as InfoTextVisualData;
            infoD.Position = newLocation;
        }
    }
}